package com.ruoyi.novel.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.novel.mapper.NovelsMapper;
import com.ruoyi.novel.domain.Novels;
import com.ruoyi.novel.service.INovelsService;

/**
 * 小说Service业务层处理
 * 
 * @author sjy
 * @date 2025-06-05
 */
@Service
public class NovelsServiceImpl implements INovelsService 
{
    @Autowired
    private NovelsMapper novelsMapper;

    /**
     * 查询小说
     * 
     * @param novelId 小说主键
     * @return 小说
     */
    @Override
    public Novels selectNovelsByNovelId(Long novelId)
    {
        return novelsMapper.selectNovelsByNovelId(novelId);
    }

    /**
     * 查询小说列表
     * 
     * @param novels 小说
     * @return 小说
     */
    @Override
    public List<Novels> selectNovelsList(Novels novels)
    {
        return novelsMapper.selectNovelsList(novels);
    }

    /**
     * 新增小说
     * 
     * @param novels 小说
     * @return 结果
     */
    @Override
    public int insertNovels(Novels novels)
    {
        return novelsMapper.insertNovels(novels);
    }

    /**
     * 修改小说
     * 
     * @param novels 小说
     * @return 结果
     */
    @Override
    public int updateNovels(Novels novels)
    {
        return novelsMapper.updateNovels(novels);
    }

    /**
     * 批量删除小说
     * 
     * @param novelIds 需要删除的小说主键
     * @return 结果
     */
    @Override
    public int deleteNovelsByNovelIds(Long[] novelIds)
    {
        return novelsMapper.deleteNovelsByNovelIds(novelIds);
    }

    /**
     * 删除小说信息
     * 
     * @param novelId 小说主键
     * @return 结果
     */
    @Override
    public int deleteNovelsByNovelId(Long novelId)
    {
        return novelsMapper.deleteNovelsByNovelId(novelId);
    }
}
